package hhhh;

import java.util.Scanner;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class TestAccount {
    String ID = "24";
    int balance = 50000;
    Scanner sc = new Scanner(System.in);

    //存款
    public void deposit(){
        System.out.println("请输入你存的数目：");
        int num = sc.nextInt();
        System.out.println("您的存款数目为："+num+"元"+"  账户余额为："+(balance+num)+"元");
    }
    //取款
    public void withdrawal(){
        System.out.println("请输入你取的数目：");
        int num = sc.nextInt();
        if (num>balance){
            System.out.println("您的余额不足！");
        }
        System.out.println("您的存款数目为："+num+"元"+"  账户余额为："+(balance+num)+"元");
    }
    //余额查询
    public void query(){
        System.out.println("账户余额为："+balance);
    }
}
